package com.dtsheep.mybatis.enums;

public enum ActiveStatusEnum {

    /**
     * 删除
     */
    DELETE(0, "删除"),

    /**
     * 正常
     */
    NORMAL(1, "正常"),

    /**
     * 失效 隐藏
     */
    INVALID(2, "失效");

    private Integer code;
    private String desc;

    ActiveStatusEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }


    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }


    public static boolean isNormal(Integer status) {
        if (status == null) {
            return false;
        }
        return status.equals(ActiveStatusEnum.NORMAL.getCode());
    }



}
